home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / oisac2 / l_5020.txt < prev    next >
Text File  |  1994-03-01  |  551b  |  14 lines

  1. 5 ONERRORGOTO1000
  2. 10 MODE8:DIM:c$=CHR$(5):a=1:b=1
  3. 20 CLS:PRINT"G.C.M. & L.C.M.  (1óa,b<10Çø)";
  4. 30 s$="a":z=a:GOSUB700:a=z
  5. 40 s$="b":z=b:GOSUB700:b=z:CLS
  6. 100 IFb>a THENf=b:g=a ELSEf=a:g=b
  7. 110 h=f-INT(f/g)*g:IFh THENf=g:g=h:GOTO110
  8. 200 l=a/g*b:PRINT"G.C.M.=";g;TAB(0);"L.C.M.=";l;:z$=INPUT$(1,@):GOTO20
  9. 700 LOCATE0,1:PRINTc$;s$;"=";z;"?";:INPUT@11;z:LOCATE0,0:z=ABSz
  10. 730 IFz>=1e10 ORz<1 ORFRACz<>0 THEN700 ELSERETURN
  11. 1000 IFERR=1 THENCLS:ONERRORGOTO0
  12. 1010 IFERL=700 THENRESUME700
  13. 1050 LOCATE0,1:PRINTc$;"not found";:z$=INPUT$(1,@):RESUME20
  14.